xend: Revert c/s 17536 which breaks PV passthru of MSI-X devices.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Sep 2009 07:48:12 +0000 (08:48 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 7 Sep 2009 07:48:12 +0000 (08:48 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/python/xen/util/pci.py
tools/python/xen/xend/server/pciif.py

index db37597cd8ea2a63eb57bd0df0f4c4862d7ed6eb..6191f9e62b6be276be0dd70a5da4b4b833576f30 100644 (file)
@@ -1173,20 +1173,6 @@ class PciDevice:
             raise PciDeviceParseError(('Failed to locate sysfs mount: %s: %s (%d)' %
                 (PROC_PCI_PATH, strerr, errno)))
 
-    def remove_msix_iomem(self, index, start, size):
-        if (index == self.table_index):
-            table_start = start+self.table_offset
-            table_end = table_start + self.msix_entries * 16
-            table_start = table_start & PAGE_MASK
-            table_end = (table_end + PAGE_SIZE) & PAGE_MASK
-            self.msix_iomem.append((table_start, table_end-table_start))
-        if (index==self.pba_index):
-            pba_start = start + self.pba_offset
-            pba_end = pba_start + self.msix_entries/8
-            pba_start = pba_start & PAGE_MASK
-            pba_end = (pba_end + PAGE_SIZE) & PAGE_MASK
-            self.msix_iomem.append((pba_start, pba_end-pba_start))
-
     def get_info_from_sysfs(self):
         self.find_capability(0x11)
         sysfs_mnt = find_sysfs_mnt()
@@ -1214,10 +1200,6 @@ class PciDevice:
                         self.ioports.append( (start,size) )
                     else:
                         self.iomem.append( (start,size) )
-                    if (self.msix):
-                        self.remove_msix_iomem(i, start, size)
-
-
 
         except IOError, (errno, strerr):
             raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
index c0b13d32b4a2530b3b886d857e11eb377bae09bc..460a937a530e3589e6f7c0530ea1c9b075784d63 100644 (file)
@@ -332,19 +332,6 @@ class PciController(DevController):
                 raise VmError(('pci: failed to configure I/O memory on device '+
                             '%s - errno=%d')%(dev.name,rc))
 
-        if dev.msix:
-            for (start, size) in dev.msix_iomem:
-                start_pfn = start>>PAGE_SHIFT
-                nr_pfns = (size+(PAGE_SIZE-1))>>PAGE_SHIFT
-                log.debug('pci-msix: remove permission for 0x%x/0x%x 0x%x/0x%x' % \
-                         (start,size, start_pfn, nr_pfns))
-                rc = xc.domain_iomem_permission(domid = fe_domid,
-                                                first_pfn = start_pfn,
-                                                nr_pfns = nr_pfns,
-                                                allow_access = False)
-                if rc<0:
-                    raise VmError(('pci: failed to remove msi-x iomem'))
-
         if not self.vm.info.is_hvm() and dev.irq:
             rc = xc.physdev_map_pirq(domid = fe_domid,
                                    index = dev.irq,